﻿@{
    UserInfo userInfo = ViewBag.userInfo as UserInfo;
}
<style>
    #leftContent { color: #fff; text-align: center; margin-top: 40px; }
    #leftContent li{line-height:30px;color: #fff;}
    #leftContent .sex { color: #1E9FFF; font-size: 22px; }
</style>
<ul class="layui-nav layui-nav-tree" id="leftContent" lay-filter="">
    <li class="layui-anim  layui-anim-scalesmall-spring margin-bottom:20px;">
        @if (userInfo.Avatar != null)
        {
            <img src="@userInfo.Avatar" width="120" height="120" class="layui-circle">
        }
        else
        {
            <i class="layui-icon layui-icon-username" style="font-size: 80px; color: #1E9FFF;"></i>
        }
    </li>
 
    <li style="height:40px;line-height:40px;">
        @if (userInfo.Sex == 0)
        {
            <i class="layui-icon layui-icon-female sex" ></i>
        }
        else if (userInfo.Sex == 1)
        {
            <i class="layui-icon layui-icon-male sex"></i>
        }
        else
        {
            <i class="layui-icon layui-icon-about sex">未知性别</i>
        }
    </li>
    <li style="font-size:16px;">@userInfo.DeptName</li>
    <li style="font-size:16px;color:gray;">@userInfo.PostName</li>
    <li style="font-size:22px;">@userInfo.Nickname</li>
    <li style="font-size:16px;color:gray;">@userInfo.Groupname</li>
    
    <li style="font-size:14px;color:gray;margin-bottom:30px;">@userInfo.Phone</li>

    <li class="layui-nav-item"><a href="javascript:;" onclick="loadMain('/Admin/Home/Home');"><i class="layui-icon layui-icon-website cxuu-list-ico"></i> 控制台</a></li>

    @if (await Authorizer.AuthView(PermissionKeys.User_UserChange))
    {
        <li class="layui-nav-item"><a href="javascript:;" onclick="loadMain('/Admin/User/UserChange')"><i class="layui-icon layui-icon-edit  cxuu-list-ico"></i> 个人信息</a></li>
    }
    <li class="layui-nav-item"> <a asp-controller="Login" asp-action="LoginOut"> <i class="layui-icon layui-icon-export  cxuu-list-ico"></i> 退出登录</a></li>
</ul>